home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
man
/
cat.n
/
string.n
< prev
next >
Wrap
Text File
|
1995-07-25
|
8KB
|
199 lines
ssssttttrrrriiiinnnngggg((((nnnn)))) TTTTccccllll (((( )))) ssssttttrrrriiiinnnngggg((((nnnn))))
_________________________________________________________________
NNNNAAAAMMMMEEEE
string - Manipulate strings
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
ssssttttrrrriiiinnnngggg _o_p_t_i_o_n _a_r_g ?_a_r_g ...?
_________________________________________________________________
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
Performs one of several string operations, depending on
_o_p_t_i_o_n. The legal _o_p_t_i_o_ns (which may be abbreviated) are:
ssssttttrrrriiiinnnngggg ccccoooommmmppppaaaarrrreeee _s_t_r_i_n_g_1 _s_t_r_i_n_g_2
Perform a character-by-character comparison of strings
_s_t_r_i_n_g_1 and _s_t_r_i_n_g_2 in the same way as the C ssssttttrrrrccccmmmmpppp
procedure. Return -1, 0, or 1, depending on whether
_s_t_r_i_n_g_1 is lexicographically less than, equal to, or
greater than _s_t_r_i_n_g_2.
ssssttttrrrriiiinnnngggg ffffiiiirrrrsssstttt _s_t_r_i_n_g_1 _s_t_r_i_n_g_2
Search _s_t_r_i_n_g_2 for a sequence of characters that
exactly match the characters in _s_t_r_i_n_g_1. If found,
return the index of the first character in the first
such match within _s_t_r_i_n_g_2. If not found, return -1.
ssssttttrrrriiiinnnngggg iiiinnnnddddeeeexxxx _s_t_r_i_n_g _c_h_a_r_I_n_d_e_x
Returns the _c_h_a_r_I_n_d_e_x'th character of the _s_t_r_i_n_g
argument. A _c_h_a_r_I_n_d_e_x of 0 corresponds to the first
character of the string. If _c_h_a_r_I_n_d_e_x is less than 0
or greater than or equal to the length of the string
then an empty string is returned.
ssssttttrrrriiiinnnngggg llllaaaasssstttt _s_t_r_i_n_g_1 _s_t_r_i_n_g_2
Search _s_t_r_i_n_g_2 for a sequence of characters that
exactly match the characters in _s_t_r_i_n_g_1. If found,
return the index of the first character in the last
such match within _s_t_r_i_n_g_2. If there is no match, then
return -1.
ssssttttrrrriiiinnnngggg lllleeeennnnggggtttthhhh _s_t_r_i_n_g
Returns a decimal string giving the number of
characters in _s_t_r_i_n_g.
ssssttttrrrriiiinnnngggg mmmmaaaattttcccchhhh _p_a_t_t_e_r_n _s_t_r_i_n_g
See if _p_a_t_t_e_r_n matches _s_t_r_i_n_g; return 1 if it does, 0
if it doesn't. Matching is done in a fashion similar
to that used by the C-shell. For the two strings to
match, their contents must be identical except that the
following special sequences may appear in _p_a_t_t_e_r_n:
Page 1 (printed 7/17/95)
ssssttttrrrriiiinnnngggg((((nnnn)))) TTTTccccllll (((( )))) ssssttttrrrriiiinnnngggg((((nnnn))))
**** Matches any sequence of characters in _s_t_r_i_n_g,
including a null string.
???? Matches any single character in _s_t_r_i_n_g.
[[[[_c_h_a_r_s]]]] Matches any character in the set given by
_c_h_a_r_s. If a sequence of the form _x----_y appears
in _c_h_a_r_s, then any character between _x and _y,
inclusive, will match.
\\\\_x Matches the single character _x. This
provides a way of avoiding the special
interpretation of the characters ****????[[[[]]]]\\\\ in
_p_a_t_t_e_r_n.
ssssttttrrrriiiinnnngggg rrrraaaannnnggggeeee _s_t_r_i_n_g _f_i_r_s_t _l_a_s_t
Returns a range of consecutive characters from _s_t_r_i_n_g,
starting with the character whose index is _f_i_r_s_t and
ending with the character whose index is _l_a_s_t. An
index of 0 refers to the first character of the string.
_L_a_s_t may be eeeennnndddd (or any abbreviation of it) to refer to
the last character of the string. If _f_i_r_s_t is less
than zero then it is treated as if it were zero, and if
_l_a_s_t is greater than or equal to the length of the
string then it is treated as if it were eeeennnndddd. If _f_i_r_s_t
is greater than _l_a_s_t then an empty string is returned.
ssssttttrrrriiiinnnngggg ttttoooolllloooowwwweeeerrrr _s_t_r_i_n_g
Returns a value equal to _s_t_r_i_n_g except that all upper
case letters have been converted to lower case.
ssssttttrrrriiiinnnngggg ttttoooouuuuppppppppeeeerrrr _s_t_r_i_n_g
Returns a value equal to _s_t_r_i_n_g except that all lower
case letters have been converted to upper case.
ssssttttrrrriiiinnnngggg ttttrrrriiiimmmm _s_t_r_i_n_g ?_c_h_a_r_s?
Returns a value equal to _s_t_r_i_n_g except that any leading
or trailing characters from the set given by _c_h_a_r_s are
removed. If _c_h_a_r_s is not specified then white space is
removed (spaces, tabs, newlines, and carriage returns).
ssssttttrrrriiiinnnngggg ttttrrrriiiimmmmlllleeeefffftttt _s_t_r_i_n_g ?_c_h_a_r_s?
Returns a value equal to _s_t_r_i_n_g except that any leading
characters from the set given by _c_h_a_r_s are removed. If
_c_h_a_r_s is not specified then white space is removed
(spaces, tabs, newlines, and carriage returns).
ssssttttrrrriiiinnnngggg ttttrrrriiiimmmmrrrriiiigggghhhhtttt _s_t_r_i_n_g ?_c_h_a_r_s?
Returns a value equal to _s_t_r_i_n_g except that any
trailing characters from the set given by _c_h_a_r_s are
removed. If _c_h_a_r_s is not specified then white space is
removed (spaces, tabs, newlines, and carriage returns).
Page 2 (printed 7/17/95)
ssssttttrrrriiiinnnngggg((((nnnn)))) TTTTccccllll (((( )))) ssssttttrrrriiiinnnngggg((((nnnn))))
KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
case conversion, compare, index, match, pattern, string
Page 3 (printed 7/17/95)